/**
 * Created by peter on 2017/2/13.
 */
import * as types from '../mutation-types'

const state = {
    loginUser:{},
    buttonPermissions:{},
    fullscreenLoading: true,
    changePasswordDialog:false
};


// getters
const getters = {

};


// actions
const actions = {

};



// mutations
const mutations = {
    [types.LOGIN_SUCCESS]: (state, user) => {
        state.loginUser = user;
    },
    [types.BUTTON_PERMISSION]: (state, btnPermission) => {
        state.buttonPermissions = btnPermission;
    },
    [types.APPINITLOADING]:(state,appLoading)=>{
        state.fullscreenLoading = appLoading;
    },
    [types.CHANGE_PASSWORD_DIALOG]:(state,dialog) => {
        state.changePasswordDialog = dialog;
    }
};

export default {
    state,
    getters,
    actions,
    mutations
};